package conf

import (
	"gitee.com/linxing_3/sr-core/config/source"
	"gitee.com/mkwchecking/sr-admin/pkg/k8s"
	"github.com/google/wire"
)

var (
	Conf     = &subDomainCfg{}
	Provider = wire.NewSet(
		Get,
		wire.FieldsOf(Conf, "K8s"),
	)
)

// 子域配置
type subDomainCfg struct {
	K8s *k8s.Config `yaml:"k8s" json:"k8s"`
}

func SetupConfig(src source.ISource) {
	src.Scan(Conf)
}

func Get() subDomainCfg {
	return *Conf
}
